package com.bitdf.txing.order.feign;

import com.bitdf.txing.order.config.FeignInterceptor;
import com.bitdf.txing.order.vo.UserAddressVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

@FeignClient(
        name = "tx-users",                 // 服务名称
        configuration = FeignInterceptor.class       // 请求拦截器 （关键代码）
)
public interface OrderUserFeignService {
    /**
     * 获取用户的收获地址
     * @param memberId
     * @return
     */
    @GetMapping("/txing/user/address/get/{memberId}")
    public List<UserAddressVo> getAddress(@PathVariable("memberId") Long memberId);
}
